package mysql

func GetGoodsInfo(goods Goods) (Goods, error) {
	newGoods := Goods{}
	res := db.Where(goods).First(&newGoods)
	return newGoods, res.Error
}
func SaveGoods(goods Goods) (Goods, error) {
	res := db.Save(&goods)
	return goods, res.Error
}
func CreateGoods(goods Goods) (Goods, error) {
	res := db.Create(&goods)
	return goods, res.Error
}
func GetProductAll() ([]Product, error) {
	var productAll []Product
	res := db.Find(&productAll)
	return productAll, res.Error
}
